window.addEventListener('load', function() {
   //1.点击tab区域实现排他
   var ul = document.querySelector('.panorama .lb ul')
   var content = document.querySelectorAll('.panorama .content > div')
   ul.onclick = function (e) {
       //    console.log(e.target); // 返回触发的事件对象
       if (e.target.tagName === 'LI') {
           
           for (var i = 0; i < ul.children.length; i++) {
               //实现排他
               ul.children[i].className = ''
               content[i].className = ''
           }
           //1.2 自己满血复活
           e.target.className = 'current'

           //2.点击那个属性就返回那个索引
           var index = e.target.getAttribute('data-index')
           // console.log(index);
           content[index].className = 'current'
       }
   } 
})



